<?php
namespace app\admin\controller;
use think\Session;
use app\common\controller\Backend;

class Main extends Backend
{
  public function index()
  {

    return view('index',[]);
  }

  public function content(){
  	echo 'content';
  }


  private function getUserMenu($userMenu){
    if(empty($userMenu)){
        return;
    }
    $html = "";
    foreach ($userMenu as $key => $menu) {
      if(empty($menu['children'])){
        $html .= "<el-menu-item index='{$menu['id']}' v-on:click=\"handleSkipUrl('{$menu['href']}','{$menu['title']}',{$menu['id']})\"><i class=\"el-icon-message\"></i>{$menu['title']}</el-menu-item>";
      }else{
        $html .= "<el-submenu index='{$menu['id']}'>";
        $html .= "<template slot=\"title\"><i class=\"el-icon-message\"></i>{$menu['title']}</template>";
        $html .= $this->getAdminMenu($menu['children']);
        $html .= "</el-submenu>";
      }
    }
    return $html;
  }
}

